# -*- coding:utf-8 -*-
# __author__ = 'xxx'
# env: python36 + zopyx.check-ssl-domains

# fuction:  测试域名ssl 是否过期


from zopyx import checker


def checkdomain():
    print("请输入需要校验的域名 cname=www.xxx.com \n")

    getdomain=input("请输入:")

    if getdomain=="" or getdomain==None:
        print("请检查输入内容")

    struse=""

    getstr=struse.join(getdomain)

    if getstr.startswith("cname="):
        namestr=getstr[6:]

        print("检查域名是：%s" %namestr)

        checkok=checker.check_host(namestr)
        print(checkok)

    else:
        print("参数输入错误，请检查输入内容")



if __name__ == '__main__':
    checkdomain()

